<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<div id="p" data-type="panel" data-defs="fit:true,iconCls:'icon-ok',headerCls:'panel_header_cls_bbw'"
	title="可以不写这个标题" style="padding: 15px;">
	<div data-type="layout" data-defs="fit:true,border:true">
		<div data-defs="region:'north',border:false,headerType:'line'" style="height: 200px; padding-top: 15px;"
			title="表单1 ">
			<form id="form1" method="post">
				<table class="stableborder" cellpadding="1" cellspacing="1">
					<tr>
						<td width="15%" class="stdlabel">简单弹出窗口</td>
						<td width="15%" class="stdinput">
							<input data-type="inputiconbox" name="name1" style="" data-defs="iconClick:searcherTest1,required:true"></input>
						</td>
						<td width="15%" class="stdlabel">文本录入框</td>
						<td width="15%" class="stdinput">
							<input data-type="inputbox" type="text" name="name2" style="" data-defs="required:true,validType:'email'"></input>
						</td>
						<td width="15%" class="stdlabel">下拉列表(单选)</td>
						<td width="15%" class="stdinput">
							<select name="name3" data-type="combogrid" style=""
								data-defs="required:true,ptborder:false,
									panelWidth: 500,idField: 'itemid',textField: 'productname',multiple: false,fitColumns: true,
									method:'post',url: '${rc.contextPath}/demo/getDataGrid.do',tipPosition:'left',
									columns: [[
										{field:'itemid',title:'ID',width:80},
										{field:'productname',title:'产品名称',width:190},
										{field:'listprice',title:'成本',width:80,align:'right'},
										{field:'unitcost',title:'单价',width:80,align:'right'},
										{field:'attr1',title:'属性',width:200},
										{field:'status',title:'状态',width:60,align:'center'}
									]]
								">
							</select>
						</td>
					</tr>
					<tr>
						<td width="15%" class="stdlabel">浮点数</td>
						<td width="15%" class="stdinput">
							<input data-type="numberbox" type="text" name="name7" style="" data-defs="precision:2,required:true"></input>
						</td>
						<td width="15%" class="stdlabel">数字格式化</td>
						<td width="15%" class="stdinput">
							<input data-type="numberbox" value="1234567.89" name="name8" style=""
								data-defs="precision:2,groupSeparator:',',decimalSeparator:'.',required:true"></input>
						</td>
						<td width="15%" class="stdlabel">时间选择</td>
						<td width="15%" class="stdinput">
							<input data-type="timespinner" type="text" name="name9" style=""
								data-defs="min:'08:30',max:'18:00',required:true,tipPosition:'left'"></input>
						</td>
					</tr>
					<tr>
						<td width="15%" class="stdlabel">日期</td>
						<td width="15%" class="stdinput">
							<input data-type="datebox" type="text" name="name10" style="" data-defs="panelWidth: 200,required:true" />
						</td>
						<td width="15%" class="stdlabel">下拉树(多选)</td>
						<td width="15%" class="stdinput">
							<select data-type="combotree" name="name11" style=""
								data-defs="multiple:true,method:'post',url: '${rc.contextPath}/demo/getTree.do',required:true">
							</select>
						</td>
						<td width="15%" class="stdlabel">下拉框(单选)</td>
						<td width="15%" class="stdinput">
							<input data-type="combobox" name="name12" style=""
								data-defs="required:true,
								method:'post',url: '${rc.contextPath}/demo/getCombo.do',
								valueField:'id',textField:'text',
								multiple:false,
								formatter: formatItem,tipPosition:'left'
								" />
						</td>
					</tr>
					<tr>
						<td width="15%" class="stdlabel">日期(带时间)</td>
						<td width="15%" class="stdinput">
							<input data-type="datetimebox" name="name13" style=""
								data-defs="panelWidth: 200,required:true,tipPosition:'left'" />
						</td>
						<td width="15%" class="stdlabel">下拉树(单选)</td>
						<td width="15%" class="stdinput">
							<select data-type="combotree" name="name14" style=""
								data-defs="multiple:false,method:'post',url: '${rc.contextPath}/demo/getTree.do',required:true">
							</select>
						</td>
						<td width="15%" class="stdlabel">下拉框(多选)</td>
						<td width="15%" class="stdinput">
							<input data-type="combobox" name="name15" style=""
								data-defs="required:true,
								method:'post',url: '${rc.contextPath}/demo/getCombo.do',
								valueField:'id',textField:'text',
								multiple:true,
								formatter: formatItem,tipPosition:'left'
								" />
						</td>
					</tr>
					<tr>
						<td width="15%" class="stdlabel">数字选择</td>
						<td width="15%" class="stdinput">
							<input data-type="numberspinner" type="text" name="name16" style=""
								data-defs="min:10,max:100,increment:10,required:true"></input>
						</td>
						<td width="15%" class="stdlabel">数字选择</td>
						<td width="15%" class="stdinput">
							<input data-type="numberspinner" type="text" name="name17" style=""
								data-defs="min:10,max:100,increment:10,required:true"></input>
						</td>
						<td width="15%" class="stdlabel">数字选择</td>
						<td width="15%" class="stdinput">
							<input data-type="numberspinner" type="text" name="name18" style=""
								data-defs="min:10,max:100,increment:10,required:true,tipPosition:'left'"></input>
						</td>
					</tr>
				</table>
			</form>
		</div>
		<div data-defs="region:'center',border:false,headerType:'line'" style="height: 161px; padding-top: 15px;"
			title="表单2">
			<form id="form2" method="post">
				<table class="stableborder" cellpadding="1" cellspacing="1">
					<tr>
						<td width="15%" class="stdlabel">复杂弹出窗口</td>
						<td width="15%" class="stdinput">
							<input data-type="inputiconbox" name="name1" style="" data-defs="iconClick:searcherTest2,required:true"></input>
						</td>
						<td width="15%" class="stdlabel">文本录入框</td>
						<td width="15%" class="stdinput">
							<input data-type="inputbox" type="text" name="name2" style="" data-defs="required:true,validType:'email'"></input>
						</td>
						<td width="15%" class="stdlabel">下拉列表(单选)</td>
						<td width="15%" class="stdinput">
							<select name="name3" data-type="combogrid" style=""
								data-defs="required:true,ptborder:false,
									panelWidth: 500,idField: 'itemid',textField: 'productname',multiple: false,fitColumns: true,
									method:'post',url: '${rc.contextPath}/demo/getDataGrid.do',tipPosition:'left',
									columns: [[
										{field:'itemid',title:'ID',width:80},
										{field:'productname',title:'产品名称',width:190},
										{field:'listprice',title:'成本',width:80,align:'right'},
										{field:'unitcost',title:'单价',width:80,align:'right'},
										{field:'attr1',title:'属性',width:200},
										{field:'status',title:'状态',width:60,align:'center'}
									]]
								">
							</select>
						</td>
					</tr>
					<tr>
						<td width="15%" class="stdlabel">日期</td>
						<td width="15%" class="stdinput">
							<input data-type="datebox" type="text" name="name10" style="" data-defs="required:true" />
						</td>
						<td width="15%" class="stdlabel">下拉树(多选)</td>
						<td width="15%" class="stdinput">
							<select data-type="combotree" name="name11" style=""
								data-defs="multiple:true,method:'post',url: '${rc.contextPath}/demo/getTree.do',required:true">
							</select>
						</td>
						<td width="15%" class="stdlabel">下拉框(单选)</td>
						<td width="15%" class="stdinput">
							<input data-type="combobox" name="name12" style=""
								data-defs="required:true,
								method:'post',url: '${rc.contextPath}/demo/getCombo.do',
								valueField:'id',textField:'text',
								multiple:false,
								formatter: formatItem,tipPosition:'left'
								" />
						</td>
					</tr>
					<tr>
						<td width="15%" class="stdlabel">数字选择</td>
						<td width="15%" class="stdinput">
							<input data-type="numberspinner" type="text" name="name16" style=""
								data-defs="min:10,max:100,increment:10,required:true"></input>
						</td>
						<td width="15%" class="stdlabel">数字选择</td>
						<td width="15%" class="stdinput">
							<input data-type="numberspinner" type="text" name="name17" style=""
								data-defs="min:10,max:100,increment:10,required:true"></input>
						</td>
						<td width="15%" class="stdlabel">数字选择</td>
						<td width="15%" class="stdinput">
							<input data-type="numberspinner" type="text" name="name18" style=""
								data-defs="min:10,max:100,increment:10,required:true,tipPosition:'left'"></input>
						</td>
					</tr>
					<tr>
						<td width="15%" class="stdlabel">备注</td>
						<td colspan="5" width="85%" class="stdinput">
							<textarea data-type="inputbox" name="name19" style="width: 100%; height: 60px;"
								data-defs="required:true,tipPosition:'left'"></textarea>
						</td>
					</tr>
				</table>
			</form>
			<div style="float: right; padding: 5px;">
				<a id="saveButton" href="javascript:void(0)" data-type="button" data-defs="iconCls:'icon-save'">保存</a>
				<a href="javascript:void(0)" data-type="button" data-defs="iconCls:'icon-reload'">清空</a>
				<a href="javascript:void(0)" data-type="button" data-defs="iconCls:'icon-delete'">删除</a>
			</div>
		</div>
	</div>
</div>
<div id="w" data-type="window" title="XXX信息查询"
	data-defs="minimizable:false,collapsible:false,modal:true,closed:true,iconCls:'icon-search'" style="padding: 1px;"></div>
<script type="text/javascript">
	function formatItem(row) {
	    var s = '<span style="font-weight:bold">' + row.text + '</span><br/>' + '<span>' + row.desc + '</span>';
	    return s;
    }
    function searcherTest1(obj) {
	    //ajaxLoading($(window.parent.document.body));
	    //alert("输入值:" + obj);
	    $("#w").window({
	        width : 880,
	        height : 500,
	        title : "XX信息查询"
	    });
	    $("#w").window("open");
	    $("#w").window("center");
	    $("#w").window("refresh", "form.html");
    }
    function searcherTest2(obj) {
	    //alert("输入值:" + obj);
	    //$("#w").window({ width : document.body.clientWidth-20, height : document.body.clientHeight-20, title : "XXX信息查询" });
	    $("#w").window("center");
	    $("#w").window("open");
	    $("#w").window("refresh", "复杂页面弹出.html");
    }
    function search(v) {
	    alert(v);
    }
    $(document).ready(function() {
	    $("#saveButton").bind("click", function() {
		    var a = $("#form1").form('validate');
		    alert(a);
	    });
    });
</script>
